<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include.inc.jsp"%>
<!DOCTYPE html>

<html>
<head>
<title>${sysConfiguration.sysName}</title>
<link href="${ctx}/static/styles/button.css" rel="stylesheet" type="text/css" />

 <link href="${ctx}/static/CloudDesk/theme/default/default.css" rel="stylesheet" type="text/css" />
 
<%@include file="/WEB-INF/views/layout/angleScript.ref.jsp"%>
<style type="text/css">
.wrapper>section {
	z-index: 0;
}

footer {
	background-color: white;
}

.dialogform {
	width: 270px;
	margin: 0 auto;
}

.dialogform td {
	height: 50px;
}

.dialogform td:first-CHILD {
	width: 70px;
}

.dialogform td:LAST-CHILD {
	width: 200px;
}
</style>
</head>
<body onselectstart="return false" oncontextmenu="return false"> 
    <div id="loadbox" style="width:100%; height:100%; text-align:center; position:absolute; background-color:#C4C4C4; z-index:999999;">
        <div id="loadbox_img" style="width:124px; height:124px; position:absolute;"><img src="${ctx}/static/images/loading/loading_124X124.gif" /></div>
        <div id="loadbox_text" style="position:absolute; width:250px; height:35px; font-size:15px;font-weight:bold; color:#FFFFFF;">
            <i>系统正在初始化中，请稍等....</i>
        </div>
    </div>
   
	<div id="SysMain"></div>
</body>
</html>


 <script src="${ctx}/static/jquery/jquery-1.11.2.min.js" type="text/javascript"></script>
<script src="${ctx}/static/CloudDesk/cDesk-2.81.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctx}/static/CloudDesk/cdesk.createdesk.js"></script>
 <script src="${ctx}/static/layer/2.3/layer.js" type="text/javascript"></script>
 
<script type="text/javascript">
    $(document).ready(function () {
    	setTimeout(function () {
            $("#loadbox").fadeOut(800, function () {
                _loadbox = document.getElementById("loadbox");
                _loadingScript = document.getElementById("loadingScript");
                if (_loadbox) {
                    _loadbox.parentNode.removeChild(_loadbox);
                }
                if (_loadingScript) {
                    _loadingScript.parentNode.removeChild(_loadingScript);
                }
            });
        }, 400);
    });
    
  //======================================================修改密码-begin=====================================================================================
	var modifyPwdDialogItem;
	function modifyPwdDialog() {
		//页面层
		modifyPwdDialogItem = layer.open({
			type : 1,
			title : '修改密码',
			skin : 'layui-layer-rim', //加上边框
			area : [ '420px', '280px' ], //宽高
			content : '<form id="modifyPwdForm" class="dialogform" action="${ctx}/sysUser/modifypwd" methon="POST">' + '<table>'
					+ '<tr><td>原密码：</td><td><input type="password" id="oldpwd" name="oldpwd" class="required"></td></tr>'
					+ '<tr><td>新密码：</td><td><input type="password" id="newpwd" name="newpwd" class="required"></td></tr>'
					+ '<tr><td>重新输入:</td><td><input type="password" id="newpwd2" name="newpwd2" class="required"></td></tr>'
					+ '<tr><td colspan="2" align="center"><a class="mbtn save" href="#" onclick="Save_OnClick(\'modifyPwdForm\')"><span>保存</span></a></td></tr>' + '</table>' + '</form>'
		});
	}
	
	function Save_OnClick(formName) {

		toolbarIndex = layer.msg('保存中...', {
			icon : 16,
			time : 0
		});
		var AjaxURL = $("#" + formName).attr('action');
		
		$.ajax({
			type : "POST",
			url : AjaxURL,
			data : $("#" + formName).serialize(),
			dataType : "json",
			success : AjaxCallbacks,
			error : AjaxCallbacks
		});

	}

	function AjaxCallbacks(result) {
		if (result != null) {

			if (result.state == 1) {
				layer.msg(result.message, {
					icon : 1
				}, function() {
					layer.close(modifyPwdDialogItem);
				});

			} else {
				layer.msg(result.message, {
					icon : 2
				});
			}
		}
	}
</script>